package com.qdxwx.models.statistic;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author ZhiYong
 * @createTime 2022/5/12 11:55
 * @description 统计实体类
 */
public class Statistic implements Serializable {

    private static final long serialVersionUID = -4426252772015699419L;

    /**
     * 主键id
     */
    private Long id;
    /**
     * 统计日期
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate statisticDate;
    /**
     * 订单数
     */
    private Long orderNum;
    /**
     * 支付成功订单数
     */
    private Long orderSuccessNum;
    /**
     * 未支付订单数
     */
    private Long orderInitNum;
    /**
     * 已取消的订单数
     */
    private Long orderClosedNum;
    /**
     * 营收额
     */
    private Integer income;
    /**
     * 用户总数
     */
    private Long userNum;
    /**
     * 登录人数（活跃人数 ）
     */
    private Long userLoginNum;

    /**
     * 注册人数
     */
    private Long userRegisterNum;
    /**
     * 课程总数
     */
    private Long courseNum;

    /**
     * 每日播放视频数
     */
    private Long courseStudyNum;
    /**
     * 文档总数
     */
    private Long documentNum;

    /**
     * 生成时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public Statistic() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDate getStatisticDate() {
        return statisticDate;
    }

    public void setStatisticDate(LocalDate statisticDate) {
        this.statisticDate = statisticDate;
    }

    public Long getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Long orderNum) {
        this.orderNum = orderNum;
    }

    public Long getOrderSuccessNum() {
        return orderSuccessNum;
    }

    public void setOrderSuccessNum(Long orderSuccessNum) {
        this.orderSuccessNum = orderSuccessNum;
    }

    public Long getOrderInitNum() {
        return orderInitNum;
    }

    public void setOrderInitNum(Long orderInitNum) {
        this.orderInitNum = orderInitNum;
    }

    public Long getOrderClosedNum() {
        return orderClosedNum;
    }

    public void setOrderClosedNum(Long orderClosedNum) {
        this.orderClosedNum = orderClosedNum;
    }

    public Integer getIncome() {
        return income;
    }

    public void setIncome(Integer income) {
        this.income = income;
    }

    public Long getUserNum() {
        return userNum;
    }

    public void setUserNum(Long userNum) {
        this.userNum = userNum;
    }

    public Long getUserLoginNum() {
        return userLoginNum;
    }

    public void setUserLoginNum(Long userLoginNum) {
        this.userLoginNum = userLoginNum;
    }

    public Long getUserRegisterNum() {
        return userRegisterNum;
    }

    public void setUserRegisterNum(Long userRegisterNum) {
        this.userRegisterNum = userRegisterNum;
    }

    public Long getCourseNum() {
        return courseNum;
    }

    public void setCourseNum(Long courseNum) {
        this.courseNum = courseNum;
    }

    public Long getCourseStudyNum() {
        return courseStudyNum;
    }

    public void setCourseStudyNum(Long courseStudyNum) {
        this.courseStudyNum = courseStudyNum;
    }

    public Long getDocumentNum() {
        return documentNum;
    }

    public void setDocumentNum(Long documentNum) {
        this.documentNum = documentNum;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Statistic{" +
                "id=" + id +
                ", statisticDate=" + statisticDate +
                ", orderNum=" + orderNum +
                ", orderSuccessNum=" + orderSuccessNum +
                ", orderInitNum=" + orderInitNum +
                ", orderClosedNum=" + orderClosedNum +
                ", income=" + income +
                ", userNum=" + userNum +
                ", userLoginNum=" + userLoginNum +
                ", userRegisterNum=" + userRegisterNum +
                ", courseNum=" + courseNum +
                ", courseStudyNum=" + courseStudyNum +
                ", documentNum=" + documentNum +
                ", createTime=" + createTime +
                '}';
    }
}
